/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-08-01
 * Time: 19:42
 */

/*
class MyArray{
    public Object[] array = new Object[10];

    public Object getPos(int pos){
        return this.array[pos];
    }

    public void setVal(int pos, Object val){
        this.array[pos] = val;
    }
}

public class Test {
    public static void main2(String[] args) {
        MyArray myArray = new MyArray();
        myArray.setVal(0,10);
        myArray.setVal(1,"hello");
        String ret = String.valueOf(myArray.getPos(1));
        System.out.println(ret);


    }

    public static void main1(String[] args) {
        int i = 0;
        Integer ii = Integer.valueOf(i);
        Integer ij = new Integer(i);

        int j = ii.intValue();

        Integer i1 = j;
        Integer j1 = (Integer) i;

        int j2 = i1;
        int k = (int) ii;
    }
}
*/

/*class MyArray{
    public Object[] array = new Object[10];

    public Object getPos(int pos){
        return this.array[pos];
    }

    public void setVal(int pos, Object val){
        this.array[pos] = val;
    }
}*/


/*
class MyArray<T>{
    public Object[] array = new Object[10];

    public T getPos(int pos){
        return (T)this.array[pos];
    }

    public void setVal(int pos, T val){
        this.array[pos] = val;
    }
}
public class Test {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setVal(0,10);
        myArray.setVal(1,19);
        int ret = myArray.getPos(0);
        System.out.println(ret);
        MyArray<String> myArray1 = new MyArray<>();
        myArray1.setVal(2, "not");
        String ret1 = myArray1.getPos(2);
        System.out.println(ret1);
    }
}*/


class MyArray <T>{
    public Object[] myArray = new Object[10];

    public T getPos(int pos){
        return (T)this.myArray[pos];
    }

    public void setVal(int pos, T val){
        this.myArray[pos] = val;
    }
}
public class Test {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setVal(0, 12);
        myArray.setVal(1, 9);
        int ret = myArray.getPos(0);
        System.out.println(ret);
        
    }
}
